<?php
session_start();

include __SITE_PATH . '/application/' . 'controller_base.class.php';
include __SITE_PATH . '/application/' . 'registry.class.php';
include __SITE_PATH . '/application/' . 'router.class.php';
include __SITE_PATH . '/application/' . 'template.class.php';

//auto load model classes
function __autoload($class_name) {
	
	//TODO create better experience))
	$filename = $class_name.'.php';
	
	$file = __SITE_PATH . '/model/' . $filename;
	
	if (file_exists ( $file ) == false) {
		return false;
	}
	include ($file);
}

// a new registry object
$registry = new registry ();
?>
